<?php declare(strict_types=1);


namespace App\Rpc\Model\Entity;

use Swoft\Db\Annotation\Mapping\Column;
use Swoft\Db\Annotation\Mapping\Entity;
use Swoft\Db\Annotation\Mapping\Id;
use Swoft\Db\Eloquent\Model;


/**
 * 用户组织表
 * Class UserOrganization
 *
 * @since 2.0
 *
 * @Entity(table="user_organization")
 */
class UserOrganization extends Model
{
    /**
     * 主键id
     * @Id()
     * @Column()
     *
     * @var int
     */
    private $id;

    /**
     * 数据唯一ID
     *
     * @Column(name="item_id", prop="itemId")
     *
     * @var string
     */
    private $itemId;

    /**
     * 用户id
     *
     * @Column(name="user_id", prop="userId")
     *
     * @var string
     */
    private $userId;

    /**
     * 组织id
     *
     * @Column(name="organization_id", prop="organizationId")
     *
     * @var string
     */
    private $organizationId;


    /**
     * @param int $id
     *
     * @return self
     */
    public function setId(int $id): self
    {
        $this->id = $id;

        return $this;
    }

    /**
     * @param string $itemId
     *
     * @return self
     */
    public function setItemId(string $itemId): self
    {
        $this->itemId = $itemId;

        return $this;
    }

    /**
     * @param string $userId
     *
     * @return self
     */
    public function setUserId(string $userId): self
    {
        $this->userId = $userId;

        return $this;
    }

    /**
     * @param string $organizationId
     *
     * @return self
     */
    public function setOrganizationId(string $organizationId): self
    {
        $this->organizationId = $organizationId;

        return $this;
    }

    /**
     * @return int
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * @return string
     */
    public function getItemId(): ?string
    {
        return $this->itemId;
    }

    /**
     * @return string
     */
    public function getUserId(): ?string
    {
        return $this->userId;
    }

    /**
     * @return string
     */
    public function getOrganizationId(): ?string
    {
        return $this->organizationId;
    }

}
